package com.runfast.waimai.web.controller;

import com.runfast.common.security.NECaptchaVerifier;
import com.runfast.common.utils.TokenUtil;
import com.runfast.common.web.entity.Result;
import com.runfast.waimai.dao.model.RunfastSmsSendrecord;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 商家活动接口
 */
@RestController("userWmSecurityController")
@RequestMapping(value= "/api/user/wm/security", headers = "token")
public class SecurityController {



    @PostMapping("/sendSms")
    public Result<List<RunfastSmsSendrecord>> sendSms(@RequestParam(value = NECaptchaVerifier.REQ_VALIDATE,required = false) String validate, String mobile, RunfastSmsSendrecord.SmsType smsType, @RequestHeader String token) {
        Integer userId = TokenUtil.getUserId(token);


        return Result.ok("");
    }

    /**
     * 检查app版本
     * @param version
     * @param token
     * @return
     */
    @PostMapping("/checkVersion")
    public Result checkVersion(@RequestParam int version, @RequestHeader String token) {
        Integer userId = TokenUtil.getUserId(token);


        return Result.ok("");
    }

}
